xenpaging: do not leak if --pagefile given twice
authorIan Campbell <ian.campbell@citrix.com>
Wed, 17 Feb 2016 14:58:33 +0000 (14:58 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 17 Feb 2016 19:22:24 +0000 (14:22 -0500)
commit7e1e001fa7d9d9df300ced3fb83df5f12ebb722b
tree17a23db5644340a39e6c22f9129b558d95fb157d
parent72c6bbe7effaf4b8ce966651fa8a8aee6112f5cc
xenpaging: do not leak if --pagefile given twice

By freeing filename (which is either NULL or the previous iteration of
this argument). This implements a semantic where the last --pagefile
given on the command line takes precedence.

This is the same semantic as the other options have.

CID: 1198792

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
tools/xenpaging/xenpaging.c